﻿using System;
using System.Net;
using System.Runtime.Serialization;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace G.APITest.Data
{
    [DataContract]
    public class ProjectTemplate : G.SL.Data.NotifyObject
    {
        private string name;
        /// <summary>
        /// Name是唯一的
        /// </summary>
        [DataMember]
        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                if (name != value)
                {
                    name = value;
                    this.NotifyPropertyChanged("Name");
                }
            }
        }

        private string localPath;
        [DataMember]
        public string LocalPath
        {
            get
            {
                return localPath;
            }
            set
            {
                if (localPath != value)
                {
                    localPath = value;
                    this.NotifyPropertyChanged("LocalPath");
                }
            }
        }

        private string description;
        [DataMember]
        public string Description
        {
            get
            {
                return description;
            }
            set
            {
                if (description != value)
                {
                    description = value;
                    this.NotifyPropertyChanged("Description");
                }
            }
        }


        private ProjectTemplateSource projectTemplateSource;
        /// <summary>
        /// 来源
        /// </summary>
        [DataMember]
        public ProjectTemplateSource ProjectTemplateSource
        {
            get
            {
                return projectTemplateSource;
            }
            set
            {
                if (projectTemplateSource != value)
                {
                    projectTemplateSource = value;
                    this.NotifyPropertyChanged("ProjectTemplateSource");
                }
            }
        }

        private string url;
        [DataMember]
        public string Url
        {
            get
            {
                return url;
            }
            set
            {
                if (url != value)
                {
                    description = value;
                    this.NotifyPropertyChanged("Url");
                }
            }
        }
    }

    /// <summary>
    /// 模版来源
    /// </summary>
    public enum ProjectTemplateSource
    {
        Local,
        Internet
    }
}
